
public class TestHeuristic {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {

		String heuristicClass;
		if(args.length>0) {
			heuristicClass = args[0];
		}
		else {
			heuristicClass = "RushHourHeuristic2";
		}
		
		try {
	        State rhs = RushHourState.createFromFile( "puzzle02.rh" );	        
			Heuristic h = (Heuristic)Class.forName(heuristicClass).newInstance();
			h.init(rhs);
			int cost = h.getHeuristic(rhs);
			System.out.println("Cost: " + cost);
		}
		catch(Throwable t) {
			t.printStackTrace();
		}
	}
}
